package com.itheima.health.dao;

import com.itheima.health.pojo.Member;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

public interface MemberDao {
    /**
     * 根据手机号查询
     * @param phoneNumber
     * @return
     */
    Member selectByPhoneNumber(@Param("phoneNumber") String phoneNumber);

    /**
     * 新增用户
     * @param member
     */
    void insert(Member member);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Member selectById(@Param("id") Integer id);

    Long selectByRegTimeBefore(@Param("endDate") String endDate);

    Long countByRegDateRange(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

    Long countByRegTimeBefore(@Param("endDate") String endDate);
}
